<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/oversea.js"></script>
<script>
function addorder()
{
	$('#addstorageform').modal('show');	
}
</script>
<title>销售项目列表</title>
<body class="withvernav">
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">销售项目列表</h1>
      <span class="pagedesc"></span>
       <div class="menulist">
        <ul class="profile_summary">
          <li style="display:none;"> <a href="javascript:void(0)" onClick="addorder()" class=""><span>增加新项目</span></a></li>
          <li><a href="/sales/addprogram"><span>增加新项目</span></a></li>
        </ul>
      </div>
    </div>
    <!--pageheader-->
    
    <div id="contentwrapper" class="contentwrapper">
      <div id="basicform" class="subcontent">
          <!--搜索栏-->
           <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
    <form class="stdform stdform2" method="get" action="/sales/salesProgramList">
      <div class="tableoptions"> 订单时间段:
        <input type="text"  name="starttime" value="{{$starttime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" /> - <input type="text"  name="endtime" value="{{$endtime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
       &nbsp;部门:<select name="department" class="selection" style="width:100px;">
                            <option value=""  selected>-选择部门-</option>
                            {{foreach from=$classid item=li key=_key}}
                            <option value="{{$li.id}}" {{if $li.id==$search.department}} selected{{/if}}>{{$li.name}}</option>
                            {{/foreach}}
        </select>
       &nbsp;负责人:<input type="text" name="other" id="other" class="width100" value="{{$search.other}}" placeholder="负责人名称" />&nbsp;
       项目名称: 
       <input type="text" name="program_name" id="program_name" class="width100" value="{{$search.program_name}}" placeholder="名称关键字" />
       &nbsp;
                          
                           
&nbsp;
        <button class="btn btn_orange btn_search radius50">Search</button>
      </div>
    </form>
    <!--搜索栏结束-->

             <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
          
            <thead>
              <tr>
               <th class="head1"><input name="allchk" id="allchk" type="checkbox" onClick="allSelect('ppid[]')"></th>
                <th class="head1">项目名称</th>
                <th class="head1">部门</th>
                <th class="head1">负责人</th>
                <th class="head1">运营店铺</th>
                <th class="head1">总收入</th>
                <th class="head1">成本</th>
                <th class="head1">剩余库存</th>
                <th class="head1">操作</th>
              </tr>
            </thead>
          
             {{foreach from=$orderlist item=detail key=key}}
                <tr>
                 <td><input name="ppid[]" type="checkbox" value="{{$detail.id}}"></td>

                <td><a href="http://192.168.1.88:90/eshop/order.do?method=edit&orderid={{$detail.orderID}}" target="_blank">{{$detail.program_name}}</a></td>
                <td>{{$department[$detail.department_id]}}</td>
                <td>{{$ownerlist[$detail.owner]}}</td>
                <td>{{$detail.store_list|getstr:16:12}}</td>
                <td>36103.0215</td>
                <td>20224.638                </td>
                <td>882.56</td>
                <td><a href="/sales/editProgram?id={{$detail.id}}">编辑</a> | <a href="#">订单统计</a> | <a href="/sales/programProductList?program_id={{$detail.id}}">商品列表</a></td>
                </tr>
              {{/foreach}}
            {{if $orderlist eq null}}
            	<tr><td colspan="9" align="center" bgcolor="#fff">暂无数据，请尝试更改查询条件试试吧！</td>
           	    </tr> 
            {{/if}}
          </table>
          
        <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
         </div></div>
<!-- 模态框（Modal）添加商品属性 -->
<form action="/datareport/ajaxbutton?op=savemabangorder"  method="post" name="attributeform" id="attributeform" >
  <div class="modal fade" id="addstorageform" tabindex="-1" role="dialog" aria-labelledby="returnaddattributeform" aria-hidden="true">
    <div class="modal-dialog" style="width:740px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="returnaddattributeform"> 添加马帮订单 </h4>
        </div>
        <div class="modal-body">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="100">马帮订单号： </td>
              <td align="left"><textarea name="orderlist" id="orderlistst" cols="10" rows="10"></textarea></td>
            </tr>
          
             <tr>
              <td>注意： </td>
              <td align="left">一行一个订单号</td>
            </tr>
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
            <button type="button" class="btn btn-primary"  onclick="AWSsubmit('attributeform','addstorageform')"> 提交 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  <!-- /.modal -->
</form>
</body>
</html>